﻿
namespace Admin.NET.Application.Service;

/// <summary>
/// 通用操作记录
/// </summary>
public class OptBillService : BaseService<OptBill>
{

    public OptBillService(IServiceScopeFactory scopeFactory) : base(scopeFactory)
    {
    }

    /// <summary>
    /// 获取列表
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    public async Task<SqlSugarPagedList<OptBill>> Page(OptBillPageInput input)
    {
        return await Queryable
           .WhereIF(input.entityName.HasValue(), it => it.entityName == input.entityName)
           .WhereIF(input.entityId.HasValue(), it => it.entityId == input.entityId)
           .WhereIF(input.danJuLeiXing.HasValue(), it => it.danJuLeiXing == input.danJuLeiXing)
           .WhereIF(input.Keyword.HasValue(), it => it.mingCheng.Contains(input.mingCheng))
           .ToPagedListAsync(input.Page, input.PageSize);
    }
}
